import request from '../../utils/request'

export function create(params) {
  return request.ajax({
      url: `/mall/order/create`,
      method: 'post',
      isJson:true,
      params,
  })
}
export function delayPay(params) {
  return request.ajax({
      url: `/mall/order/delayPay`,
      method: 'post',
      params,
  })
}

export function getDetail(id){
  return request.ajax({
    url: `/mall/orderView/getDetail/${id}`,
    method: 'post',
  })
}
export function getOrderDetail(id){
  return request.ajax({
    url: `/mall/order/option/getOrderDetail/${id}`,
    method: 'post',
  })
}
export function refundApply(params){
  return request.ajax({
    url: `/mall/order/option/applyRefund`,
    method: 'post',
    params
  })
}


export function confirmShipped(id){
  return request.ajax({
    url: `/mall/order/option/confirmShipped/${id}`,
    method: 'post',
  })
}
export function queryLogistics(id){
  return request.ajax({
    url: `/logistics/query/${id}`,
    method: 'post',
  })
}
export function confirmAll(id){
  return request.ajax({
    url: `/mall/order/option/confirmAll/${id}`,
    method: 'post',
  })
}

export function cancelOrder(id){
  return request.ajax({
    url: `/mall/order/option/cancelOrder/${id}`,
    method: 'post',
  })
}